home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr10 / snr503.zip / TRUNCATE.S < prev    next >
Text File  |  1993-05-30  |  2KB  |  30 lines

  1. \  TRUNCATE.S
  2. \  File truncator routine
  3.  
  4. \  This table copies a file until it encounters a DOS end-of-file character
  5. \  (hex 1a). The end-of-file character is not copied. The difference between
  6. \  this table and the DOS COPY command, is that this table will truncate the
  7. \  output file AS SOON AS the end-of-file character is encountered whereas the
  8. \  DOS COPY command will only truncate the output file if the EOF character is
  9. \  within the last 512 characters of the file. This table is handy for removing
  10. \  garbage at the end of a file when it occurs beyond an EOF character; many
  11. \  data base programs and some word processing programs retain this junk.
  12.  
  13. \\Q1a    \ the 1a is defined as the Quit character. You may change this
  14.          \ code to any character you like, and SNR will truncate
  15.          \ the output file when it is encountered.
  16.  
  17. \q=           \ Don't output the end-of-file character before quitting.
  18.               \ If this equation is omitted, the end-of-file character
  19.               \ will be added to the output file just before quitting.
  20.  
  21. \80\80=\80\80  \ This equation is necessary to coerce this table into
  22.                \ assembling as a multi-character translate table; if we
  23.                \ didn't do that, the \\Q setup code would not work. Note that
  24.                \ ANY 1-to-many, many-to-1 or many-to-many equation will
  25.                \ do the coercion; we've just chosen a trivial equation which
  26.                \ will have absolutely no effect on the output file, since it
  27.                \ converts to itself. If you decide to include this table as
  28.                \ part of a larger multi-character translate table, you can
  29.                \ remove this particular equation.
  30.